
#ifndef GLOBALS_H
#define GLOBALS_H

#define USE_CUBEMAP_PROJ

//#include <GL/glew.h>
#include <vector>
#include <memory>

#include "../GLRenderer.h"

class Camera;
class Program;

/*
typedef struct RenderState{
	Camera* current_cam;
	Program* current_program;
	int binded_textures[16];
	bool wireframe_mode;
}RenderState;
*/
class ViewerState : public RenderState {
public:
	//bool wireframe_mode;

	ViewerState() {
		RenderState::wireframe_mode = false;
		current_cam = nullptr;
		for( int i = 0; i < 16; i++ )
		{
			binded_textures[i] = -1;
		}
	}
};


//extern RenderState g_render_state;

extern ViewerState g_render_state;


extern double	g_cur_time,
				g_delta_time,
				g_prev_time,
				g_time_acc;



extern std::vector<unsigned char> g_pressed_keys;

class GLStaticMesh;
extern std::vector<GLStaticMesh> g_static_meshes;

class BaseEntity;
extern std::vector<std::unique_ptr<BaseEntity>> g_entities;

#endif
